﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Novel.Entity
{
    public class PageEntity
    {

        public enum EnumPrimaryKeyType
        {
            Num,
            String,
            DateTime,
        }
        private string _tbName = "";
        /// <summary>
        /// 表名(可多表)a mm inner join b m ON a.memId=b.ID
        /// </summary>
        public string tbName
        {
            get { return _tbName; }
            set { _tbName = value; }
        }
        private string _PKey = "ID";
        /// <summary>
        /// 主键
        /// </summary>
        public string PKey
        {
            get { return _PKey; }
            set { _PKey = value; }
        }
        private EnumPrimaryKeyType _PKeyType = EnumPrimaryKeyType.Num;
        /// <summary>
        /// 主键的类型,0-数字类型,1-字符类型,2-日期时间类型
        /// </summary>
        public EnumPrimaryKeyType PKeyType
        {
            get { return _PKeyType; }
            set { _PKeyType = value; }
        }
        private string _Orderby = "ID desc";
        /// <summary>
        /// 排序字符串
        /// </summary>
        public string Orderby
        {
            get { return _Orderby; }
            set { _Orderby = value; }
        }
        private string _Collist = "*";
        /// <summary>
        /// 要查询出的字段列表,*表示全部字段
        /// </summary>
        public string Collist
        {
            get { return _Collist; }
            set { _Collist = value; }
        }
        /// <summary>
        /// 查询条件
        /// </summary>
        private string _Where = "";
        public string Where
        {
            get { return _Where; }
            set { _Where = value; }
        }
        private int _PageSize;
        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize
        {
            get { return _PageSize; }
            set { _PageSize = value; }
        }
        private int _CurrentPageIndex;
        /// <summary>
        /// 当前页
        /// </summary>
        public int CurrentPageIndex
        {
            get { return _CurrentPageIndex; }
            set { _CurrentPageIndex = value; }
        }
        private int _TotalPages;
        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPages
        {
            get { return _TotalPages; }
            set { _TotalPages = value; }
        }
        private int _TotalCount;
        /// <summary>
        /// 总条数
        /// </summary>
        public int TotalCount
        {
            get { return _TotalCount; }
            set { _TotalCount = value; }
        }
        private int _CurCount;
        /// <summary>
        /// 当前条数
        /// </summary>
        public int CurCount
        {
            get { return _CurCount; }
            set { _CurCount = value; }
        }

    }
}
